package com.jinly.ryder.ansible.service.impl;

public class LineUtil {
    public static String get(String line, String begin, String end) {
        int beginIndex = line.indexOf(begin);
        int endIndex = line.lastIndexOf(end);
        if (beginIndex >= 0 && endIndex > 0 && endIndex > beginIndex) {
            return line.substring(beginIndex + begin.length(), endIndex);
        }
        return null;
    }
}
